package com.xiaxiang.xiawan.My;

import android.app.Activity;
import android.content.Intent;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.StaggeredGridLayoutManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.TextView;

import com.dg.acb.utils.configdata.XXConstants;
import com.donggua.aichebao.commonui.info.InfoItemLayout;
import com.donggua.aichebao.commonui.refresh.RefreshListener;
import com.donggua.aichebao.commonui.refresh.XXPullToRefreshRecyclerView;
import com.xiaxiang.xiawan.FunPhoto.FunPhotoCreate;
import com.xiaxiang.xiawan.Home.Adapter.VideoRefreshAdapt;
import com.xiaxiang.xiawan.Home.HomeData;
import com.xiaxiang.xiawan.Home.HomeFragmentOperator;
import com.xiaxiang.xiawan.R;
import com.xiaxiang.xiawan.Ui.WaitDialog;
import com.xiaxiang.xiawan.Util.XXToolUtil;
import com.xiaxiang.xiawan.XXConfigData;
import com.xiaxiang.xiawan.XXMainApplication;
import com.xiaxiang.xiawan.task.DownloadEffectTask;
import com.xiaxiang.xiawan.view.CustomPullToRefreshRecyclerView;
import com.xiaxiang.xiaxwan.ar.data.XXARMaterialVideoData;
import com.xx.xiawan.net.DGJsonResult;
import com.xx.xiawan.net.DGRequestListener;
import com.xx.xiawan.net.GetRequest;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;

public class MyPraiseActivity extends AppCompatActivity {
    String title = "我的赞";
    private XXMainApplication app;
    private String token;
    private View view;
    protected HomeFragmentOperator mHomeFragmentOperator;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,  WindowManager.LayoutParams.FLAG_FULLSCREEN);
        view = getLayoutInflater().inflate(R.layout.activity_my_praise, null);
        mHomeFragmentOperator = new HomeFragmentOperator(getActivity(), XXConstants.HTTP_MY_LIKE_DATA_URL,view);
        mHomeFragmentOperator.initView(R.id.video_list);
        setContentView(view);
        initTitle();
    }

    public void onResume(){
        super.onResume();
        mHomeFragmentOperator.onResume();
    }

    private void initTitle() {
        ((TextView)findViewById(R.id.TitleBarText)).setText(title);
        ImageView back = (ImageView) findViewById(R.id.TitleBarLeftImg);
        back.setVisibility(View.VISIBLE);
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }

    private  Activity getActivity(){
        return this;
    }
}
